/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.fee.entity;

import com.google.common.collect.Lists;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.core.persistence.DataEntity;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 数据源字段名/表头Entity
 * @author cyf
 * @version 2016-11-22
 */
public class DataCode extends DataEntity<DataCode> {
	
	private static final long serialVersionUID = 1L;
	private Integer codeIndex;		// 序号
	private String name;		// 字段名称
	private String type;		// 值类型
	private FeeData feeData;		// 数据源
	private Field feeField;		// 系统字段

	private List<DataValue> feeDataValueList = Lists.newArrayList();		// 子表列表

	//后期添加
	private String feeOrderField;	//订单字段
	private String operateType;	//操作类型
	public static final String MANUAL_OPERATION = "YES";//代表手动增加数据源字段


	public DataCode() {
		super();
	}

	public DataCode(String id){
		super(id);
	}
	public DataCode(FeeData feeData){
		this.feeData = feeData;
	}

	@NotNull(message="序号不能为空")
	@ExcelField(title="序号", align=2, sort=7)
	public Integer getCodeIndex() {
		return codeIndex;
	}

	public void setCodeIndex(Integer codeIndex) {
		this.codeIndex = codeIndex;
	}
	
	@ExcelField(title="字段名称", align=2, sort=8)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@ExcelField(title="值类型", align=2, sort=9)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@ExcelField(title="数据源", align=2, sort=10)
	public FeeData getFeeData() {
		return feeData;
	}

	public void setFeeData(FeeData feeData) {
		this.feeData = feeData;
	}
	
	@ExcelField(title="系统字段", align=2, sort=11)
	public Field getFeeField() {
		return feeField;
	}

	public void setFeeField(Field feeField) {
		this.feeField = feeField;
	}

	@ExcelField(title="订单字段", align=2, sort=11)
	public String getFeeOrderField() {
		return feeOrderField;
	}

	public void setFeeOrderField(String feeOrderField) {
		this.feeOrderField = feeOrderField;
	}

	public String getOperateType() {
		return operateType;
	}

	public void setOperateType(String operateType) {
		this.operateType = operateType;
	}

	public List<DataValue> getFeeDataValueList() {
		return feeDataValueList;
	}

	public void setFeeDataValueList(List<DataValue> feeDataValueList) {
		this.feeDataValueList = feeDataValueList;
	}
}